﻿using BusinessLayer.Dal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Biz
{
    public class Manufacturer
    {
        [Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [StringLength(250)]
        public string Name { get; set; }
        public string Comment { get; set; }
        public virtual List<Product> Products { get; set; }


        public override string ToString()
        {
            return Name;
        }

        ManufacturerDal dal = new ManufacturerDal();

        public List<Manufacturer> GetAll()
        {
            return dal.GetAllManufacturer();
        }
    }
}